BASS_ChannelGetPosition

Retrieves the playback position of a sample, stream, MOD music, or CD channel.

DWORD WINAPI BASS_ChannelGetPosition(
    DWORD handle
);

Parameters
handleThe channel handle... a HCHANNEL, HMUSIC, HSTREAM, or CDCHANNEL.

Return value
If an error occurs, 0xFFFFFFFF is returned, use BASS_ErrorGetCode to get the error code. If successful, the position is returned as follows.

HCHANNELPosition in bytes.
HMUSICLOWORD = order, HIWORD = row * scaler (see BASS_MusicSetPositionScaler).
HSTREAMTotal number of bytes played since the stream was last flushed. In the case of a looping file stream, the count also loops (at the end of the file, it goes back to 0), to make it easier to use the position for synchronizing.
CDCHANNELPosition in milliseconds from the start of the track.

Error codes
BASS_ERROR_HANDLEhandle is not a valid channel.
BASS_ERROR_CDINIT BASS_CDInit has not been successfully called.

See also
BASS_ChannelGetLevel, BASS_ChannelIsActive, BASS_ChannelSetPosition